package com.example.homework09.sqliteroom;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;
import java.util.List;

@Dao
public interface UserDao {
    @Insert
    Void insert(User user);

    @Query("SELECT * FROM users")
    List<User> getALL();

    @Query("SELECT * FROM users WHERE age<:age")
    List<User> searchUsersByAge(int age);
}
